from django.contrib import admin

from app.admin import FormBaseConfig

from . import models
from .resources import CustomerIntentionResource


@admin.register(models.CustomerIntention)
class CustomerIntentionAdmin(FormBaseConfig):
    resource_class = CustomerIntentionResource

    list_display = ('id', 'created_by', 'department', 'time', 'name', 'level',
                    'phone', 'is_visit', 'visit_time', 'remark', 'customer_status', 'active')
    list_display_links = ('id', 'created_by', 'department', 'time', 'name',
                          'level', 'phone', 'is_visit', 'visit_time', 'remark', 'customer_status', 'active')
    list_filter = ('department',  'time',
                   'name', 'level', 'phone', 'is_visit', 'visit_time')
    search_fields = ('department', 'name', 'phone')
    list_per_page = 10
    list_max_show_all = 100
